Skip to content

Conversation

@kojix2
Copy link
Contributor

@kojix2 kojix2 commented Oct 19, 2025

Hello,
This pull request refactors part of the OptionParser#parse method into three private methods:

  • parse_arg_to_flag_and_value
  • handle_flag
  • remove_handled_args

The intention is that this change does not alter the program’s behavior in any way.

This refactoring is a preparatory step toward enabling short option combinations.
#10981

Thank you.

@kojix2
Copy link
Contributor Author

kojix2 commented Oct 28, 2025

These method names may not be ideal.
If you have better ideas, please feel free to suggest them.

  • parse_arg_to_flag_and_value
  • handle_flag
  • remove_handled_args

@straight-shoota straight-shoota added this to the 1.19.0 milestone Oct 28, 2025
@straight-shoota straight-shoota merged commit 5eec033 into crystal-lang:master Oct 30, 2025
39 checks passed
@kojix2 kojix2 deleted the optrefactor branch November 2, 2025 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants